import store from '../store'
export function toast(msg, type) {


    switch (type) {
        case 'dander':
            type = 'icon-toast-shibai_huaban'
            break;
        case 'warnning':
            type = 'icon-toast-jinggao'
            break;
        default:
            type = 'icon-toast_chenggong'
    }
    store.commit('isShowToast', { msg, type })
    setTimeout(() => {
        store.commit('hideToast')
    }, 1500)
}